package com.micro.service.common.exception;



/**
 * @author lvxiucai
 * @description
 * @date 2019/9/11
 */
public class JiangHuException extends RuntimeException {

    private static final long serialVersionUID = 8812786308084957915L;
    /**
     * 异常信息
     */
    private String message;
    /**
     * 异常code,默认为系统异常
     */
    private String code = "500";

    public JiangHuException(String message){
        super(message);
        this.message = message;
    }

    public JiangHuException(String message, Throwable throwable){
        super(message,throwable);
        this.message = message;
    }

    public JiangHuException(String message, String code){
        super(message);
        this.message = message;
        this.code = code;
    }

    public JiangHuException(String message, String code, Throwable e){
        super(message,e);
        this.message = message;
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String  getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }


}
